program Task2_1;

{$APPTYPE CONSOLE}

var n:int64;
begin
  reset(input,'input.txt');
  rewrite(output,'output.txt');
  read(n);
  write(n*(1+abs(n))div 2+n shr 63);

end.
